package com.gf.controller.shop;


import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


/*
* 处理接收店铺参数并实现商店跳转的servlet
* */

@WebServlet(name = "turnshoppage",urlPatterns = "/turnshoppage")
public class TurnshopServlet extends HttpServlet {

    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {






    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        String shop_id = request.getParameter("shop_id");
        //接收传过来的shop_id参数
        request.setAttribute("shop_id", shop_id);
        //通过request传递参数
        request.getRequestDispatcher("menu.jsp").forward(request,response);
        //通过转发携带参数到菜单展示页面
    }
}
